package huang.teamwork12;

public class OnlineShopSystem {
		public static void main(String[] args) {
			UserControl ad=new UserControl();
			SellerControl sc=new SellerControl();
			//没被占用的用户名u1
			User u1=new User("jin","1234");
			//店铺的用户u3
			User u3=new User("guo","1234");
			//添加的商品
			Goods g1=new Goods("pen",2.00d,500);
			//修改后的商品的名字
			Goods g2=new Goods("pen",2.00d,500);
			//添加店铺的名字
			Shop sp1=new Shop("LOWSON",g1);
			//第一次注册成功
			ad.registerU(u1);
			System.out.println();
			//第二次注册用户名被占用
			ad.registerU(u1);
			System.out.println();
			//登陆成功
			ad.login(u1);
			System.out.println();
			//申请开店
			u1.setShop(sp1);
			ad.openShop(u1);
			System.out.println();
			//申请开店（店铺名被占用）
			u1.setShop(sp1);
			ad.openShop(u1);
			System.out.println();
			//添加商品到商店
			sc.addGoods(g2);
			System.out.println();
			//修改商品到商店
			sc.modifyGoods(g1);
			System.out.println();
		}
}
